{% extends 'myhome/index.html'%}
{% block title %}
<title>我的订单</title>
{% endblock %}

{% block css %}
<link href="/static/myhome/css/personal.css" rel="stylesheet" type="text/css">
<link href="/static/myhome/css/orstyle.css" rel="stylesheet" type="text/css">
{% endblock %}

{% block js%}
<script src="/static/myhome/AmazeUI-2.4.2/assets/js/jquery.min.js" type="text/javascript"></script>
<script src="/static/myhome/AmazeUI-2.4.2/assets/js/amazeui.js" type="text/javascript"></script>
{%endblock%}

{% block con %}
<div class="center">
	<div class="col-main">
		<div class="main-wrap">

			<div class="user-order">

				<!--标题 -->
				<div class="am-cf am-padding">
					<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">订单管理</strong> / <small>Order</small></div>
				</div>
				<hr>

				<div class="am-tabs am-tabs-d2 am-margin" data-am-tabs="">

					<ul class="am-avg-sm-5 am-tabs-nav am-nav am-nav-tabs">
						<li class="am-active"><a href="#tab1">所有订单</a></li>
						<li><a href="#tab2">待付款</a></li>
						<li><a href="#tab3">待发货</a></li>
						<li><a href="#tab4">待收货</a></li>
						<li><a href="#tab5">待评价</a></li>
					</ul>

					<div class="am-tabs-bd" style="touch-action: pan-y; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">
						
						<div class="am-tab-panel am-fade am-in am-active" id="tab1">
							<div class="order-top">
								<div class="th th-item">
									商品
								</div>
								<div class="th th-price">
									单价
								</div>
								<div class="th th-number">
									数量
								</div>
								<div class="th th-operation">
									商品操作
								</div>
								<div class="th th-amount">
									合计
								</div>
								<div class="th th-status">
									交易状态
								</div>
								<div class="th th-change">
									交易操作
								</div>
							</div>

							<div class="order-main">
								<div class="order-list">
									
								{% for v in allorder %}
									<div class="order-status5">
										<div class="order-title">
											<div class="dd-num">订单编号：<a href="javascript:;">{{ v.id }}</a></div>
											<span>成交时间：{{ v.addtime }}</span>
											<!--    <em>店铺：小桔灯</em>-->
										</div>
										<div class="order-content">
											<div class="order-left">
											{% for vv in v.orderinfo_set.all %}
												<ul class="item-list">
													<li class="td td-item">
														<div class="item-pic">
															<a href="#" class="J_MakePoint">
																<img src="{{ vv.pic_url }}" class="itempic J_ItemImg">
															</a>
														</div>
														<div class="item-info">
															<div class="item-basic-info">
																<a href="#">
																	<p>{{ v那六 }}</p>
																	
																</a>
															</div>
														</div>
													</li>
													<li class="td td-price">
														<div class="item-price">
															{{ vv.price }}
														</div>
													</li>
													<li class="td td-number">
														<div class="item-number">
															<span>×</span>{{ vv.num }}
														</div>
													</li>
													<li class="td td-operation">
														<div class="item-operation">
															
														</div>
													</li>
												</ul>
											{% endfor %}
											</div>
											<div class="order-right">
												<li class="td td-amount">
													<div class="item-amount">
														合计：{{ v.totalprice }}
														
													</div>
												</li>
												<div class="move-right">
													<li class="td td-status">
														<div class="item-status">
															<p class="Mystatus">
																{% if v.status == 0 %}
																	未支付
																{% elif v.status == 1 %}
																	已支付,代发货
																{% elif v.status == 2 %}
																	已发货,待收货
																{% endif %}
															</p>
															<p class="order-info"><a href="orderinfo.html">订单详情</a></p>
															<p class="order-info"><a href="logistics.html">查看物流</a></p>
														</div>
													</li>
													<li class="td td-change" id=“dele”>
														<div class="am-btn am-btn-danger anniu" >
															删除订单
														</div>
													</li>
												</div>
											</div>
										</div>
									</div>
								{% endfor %}
							
								</div>

							</div>
						</div>
						
						<div class="am-tab-panel am-fade" id="tab2">

							<div class="order-top">
								<div class="th th-item">
									商品
								</div>
								<div class="th th-price">
									单价
								</div>
								<div class="th th-number">
									数量
								</div>
								<div class="th th-operation">
									商品操作
								</div>
								<div class="th th-amount">
									合计
								</div>
								<div class="th th-status">
									交易状态
								</div>
								<div class="th th-change">
									交易操作
								</div>
							</div>

							<div class="order-main">
								<div class="order-list">
									{%for n in nupayorder%}
									<div class="order-status1">
										<div class="order-title">
											<div class="dd-num">订单编号：<a href="javascript:;">{{n.id}}</a></div>
											<span>成交时间：{{ n.addtime }}</span>
											<!--    <em>店铺：小桔灯</em>-->
										</div>
										<div class="order-content">
											<div class="order-left">
												{% for nn in n.orderinfo_set.all %}
												<ul class="item-list">
													<li class="td td-item">
														<div class="item-pic">
															<a href="#" class="J_MakePoint">
																<img src="{{nn.pic_url}}" class="itempic J_ItemImg">
															</a>
														</div>
														<div class="item-info">
															<div class="item-basic-info">
																<a href="#">
																	<p>{{nn.name}}</p>
																</a>
															</div>
														</div>
													</li>
													<li class="td td-price">
														<div class="item-price">
															{{nn.price}}
														</div>
													</li>
													<li class="td td-number">
														<div class="item-number">
															<span>×</span>{{nn.num}}
														</div>
													</li>
													<li class="td td-operation">
														<div class="item-operation">

														</div>
													</li>
												</ul>
												{%endfor%}
											</div>
										</div>
									</div>
									{%endfor%}
									<div class="order-right">
											<li class="td td-amount">
												<div class="item-amount">
													合计：{{ nupayprice}}
												</div>
											</li>
											<div class="move-right">
												<li class="td td-status">
													<div class="item-status">
														<p class="Mystatus">等待买家付款</p>
														<p class="order-info"><a href="#">取消订单</a></p>
													</div>
												</li>
												<li class="td td-change">
													<a href="pay.html">
													<div class="am-btn am-btn-danger anniu">
														一键支付</div></a>
												</li>
											</div>
										</div>

								</div>

							</div>
						</div>
						<div class="am-tab-panel am-fade" id="tab3">
							<div class="order-top">
								<div class="th th-item">
									商品
								</div>
								<div class="th th-price">
									单价
								</div>
								<div class="th th-number">
									数量
								</div>
								<div class="th th-operation">
									商品操作
								</div>
								<div class="th th-amount">
									合计
								</div>
								<div class="th th-status">
									交易状态
								</div>
								<div class="th th-change">
									交易操作
								</div>
							</div>

							<div class="order-main">
								<div class="order-list">
									{% for e in unexpress%}
									<div class="order-status2">
										<div class="order-title">
											<div class="dd-num">订单编号：<a href="javascript:;">{{e.id}}</a></div>
											<span>成交时间：{{e.addtime}}</span>
											<!--    <em>店铺：小桔灯</em>-->
										</div>
										<div class="order-content">
											<div class="order-left">
												{% for ee in e.orderinfo_set.all %}
												<ul class="item-list">
													<li class="td td-item">
														<div class="item-pic">
															<a href="#" class="J_MakePoint">
																<img src="{{ee.pic_url}}" class="itempic J_ItemImg">
															</a>
														</div>
														<div class="item-info">
															<div class="item-basic-info">
																<a href="#">
																	<p>{{ee.name}}</p>
																</a>
															</div>
														</div>
													</li>
													<li class="td td-price">
														<div class="item-price">
															{{ee.price}}
														</div>
													</li>
													<li class="td td-number">
														<div class="item-number">
															<span>×</span>{{ee.num}}
														</div>
													</li>
													<li class="td td-operation">
														<div class="item-operation">
															<a href="refund.html">退款</a>
														</div>
													</li>
												</ul>
												{%endfor%}

											</div>
											<div class="order-right">
												<li class="td td-amount">
													<div class="item-amount">
														合计：{{e.totalprice}}
													</div>
												</li>
												<div class="move-right">
													<li class="td td-status">
														<div class="item-status">
															<p class="Mystatus">买家已付款</p>
															<p class="order-info"><a href="orderinfo.html">订单详情</a></p>
														</div>
													</li>
													<li class="td td-change">
														<div class="am-btn am-btn-danger anniu">
															提醒发货</div>
													</li>
												</div>
											</div>
										</div>
									</div>
									{%endfor%}
								</div>
							</div>
						</div>
						<div class="am-tab-panel am-fade" id="tab4">
							<div class="order-top">
								<div class="th th-item">
									商品
								</div>
								<div class="th th-price">
									单价
								</div>
								<div class="th th-number">
									数量
								</div>
								<div class="th th-operation">
									商品操作
								</div>
								<div class="th th-amount">
									合计
								</div>
								<div class="th th-status">
									交易状态
								</div>
								<div class="th th-change">
									交易操作
								</div>
							</div>

							<div class="order-main">
								<div class="order-list">
									{% for nr in unreceive%}
									<div class="order-status2">
										<div class="order-title">
											<div class="dd-num">订单编号：<a href="javascript:;">{{nr.id}}</a></div>
											<span>成交时间：{{nr.addtime}}</span>
											<!--    <em>店铺：小桔灯</em>-->
										</div>
										<div class="order-content">
											<div class="order-left">
												{% for nrr in nr.orderinfo_set.all %}
												<ul class="item-list">
													<li class="td td-item">
														<div class="item-pic">
															<a href="#" class="J_MakePoint">
																<img src="{{nrr.pic_url}}" class="itempic J_ItemImg">
															</a>
														</div>
														<div class="item-info">
															<div class="item-basic-info">
																<a href="#">
																	<p>{{ee.name}}</p>
																</a>
															</div>
														</div>
													</li>
													<li class="td td-price">
														<div class="item-price">
															{{nrr.price}}
														</div>
													</li>
													<li class="td td-number">
														<div class="item-number">
															<span>×</span>{{nrr.num}}
														</div>
													</li>
													<li class="td td-operation">
														<div class="item-operation">
															<a href="refund.html">退款/退货</a>
														</div>
													</li>
												</ul>
												{%endfor%}

											</div>
											<div class="order-right">
												<li class="td td-amount">
													<div class="item-amount">
														合计：{{nr.totalprice}}													
													</div>
												</li>
												<div class="move-right">
													<li class="td td-status">
														<div class="item-status">
															<p class="Mystatus">卖家已发货</p>
															<p class="order-info"><a href="orderinfo.html">订单详情</a></p>
															<p class="order-info"><a href="logistics.html">查看物流</a></p>
															<p class="order-info"><a href="#">延长收货</a></p>
														</div>
													</li>
													<li class="td td-change">
														<div class="am-btn am-btn-danger anniu">
															确认收货</div>
													</li>
												</div>
											</div>
										</div>
									</div>
									{%endfor%}
								</div>
							</div>
						</div>
						<div class="am-tab-panel am-fade" id="tab5">
							<div class="order-top">
								<div class="th th-item">
									商品
								</div>
								<div class="th th-price">
									单价
								</div>
								<div class="th th-number">
									数量
								</div>
								<div class="th th-operation">
									商品操作
								</div>
								<div class="th th-amount">
									合计
								</div>
								<div class="th th-status">
									交易状态
								</div>
								<div class="th th-change">
									交易操作
								</div>
							</div>

							<div class="order-main">
								<div class="order-list">
									{% for j in judge%}
									<div class="order-status2">
										<div class="order-title">
											<div class="dd-num">订单编号：<a href="javascript:;">{{j.id}}</a></div>
											<span>成交时间：{{j.addtime}}</span>
											<!--    <em>店铺：小桔灯</em>-->
										</div>
										<div class="order-content">
											<div class="order-left">
												{% for jj in j.orderinfo_set.all %}
												<ul class="item-list">
													<li class="td td-item">
														<div class="item-pic">
															<a href="#" class="J_MakePoint">
																<img src="{{jj.pic_url}}" class="itempic J_ItemImg">
															</a>
														</div>
														<div class="item-info">
															<div class="item-basic-info">
																<a href="#">
																	<p>{{jj.name}}</p>
																</a>
															</div>
														</div>
													</li>
													<li class="td td-price">
														<div class="item-price">
															{{jj.price}}
														</div>
													</li>
													<li class="td td-number">
														<div class="item-number">
															<span>×</span>{{jj.num}}
														</div>
													</li>
													<li class="td td-operation">
														<div class="item-operation">
															<a href="refund.html">退款/退货</a>
														</div>
													</li>
												</ul>
												{%endfor%}

											</div>
											<div class="order-right">
												<li class="td td-amount">
													<div class="item-amount">
														合计：{{j.totalprice}}
													</div>
												</li>
												<div class="move-right">
													<li class="td td-status">
														<div class="item-status">
															<p class="Mystatus">交易成功</p>
															<p class="order-info"><a href="orderinfo.html">订单详情</a></p>
															<p class="order-info"><a href="logistics.html">查看物流</a></p>
														</div>
													</li>
													<li class="td td-change">
														<a href="commentlist.html">
															<div class="am-btn am-btn-danger anniu">评价商品</div>
														</a>
													</li>
												</div>
											</div>
										</div>
									</div>
									{%endfor%}
								</div>
							</div>
						</div>

					</div>

				</div>
			</div>
		</div>
	</div>
	<aside class="menu">
		<ul>
			<li class="person">
				<a href="{% url 'myhome_myinfo_index'%}">个人中心</a>
			</li>
			<li class="person">
				<a href="#">个人资料</a>
				<ul>
					<li> <a href="{%url 'myhome_myinfo_userinfo'%}">个人信息</a></li>
					<li> <a href="safety.html">安全设置</a></li>
					<li> <a href="{% url 'myhome_myinfo_address' %}">收货地址</a></li>
				</ul>
			</li>
			<li class="person">
				<a href="#">我的交易</a>
				<ul>
					<li class="active"><a href="#">订单管理</a></li>
					<li> <a href="change.html">退款售后</a></li>
				</ul>
			</li>
			<li class="person">
				<a href="#">我的资产</a>
				<ul>
					<li> <a href="coupon.html">优惠券 </a></li>
					<li> <a href="bonus.html">红包</a></li>
					<li> <a href="bill.html">账单明细</a></li>
				</ul>
			</li>

			<li class="person">
				<a href="#">我的小窝</a>
				<ul>
					<li> <a href="collection.html">收藏</a></li>
					<li> <a href="foot.html">足迹</a></li>
					<li> <a href="comment.html">评价</a></li>
					<li> <a href="news.html">消息</a></li>
				</ul>
			</li>

		</ul>

	</aside>
</div>
<script>
	// console.log($('#dele'))
	// $("#dele div").click(function(){
	// 	console.log(11)
	// 	//  获取当前订单
	// 	$(this).parents(".item-list").hide()
	// })

</script>
{% endblock %}
